-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curve lp tests #293
Curve lp tests #293
Conversation
Also can you adopt the prettier format. |
@@ -792,6 +807,38 @@ describe("IncurDebt", async () => { | |||
.connect(daiHolder) | |||
.createLP(ohmAmount, daiAmount, uniSwapStrategy.address, data); | |||
}); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you only tested for Should allow borrower create lp for curve
can you test for other failed instances like the if statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant testing for these instances
if (poolTokens[0] == ohmAddress) {
if (poolTokens[1] != pairTokenAddress) revert CurveStrategy_LPTokenDoesNotMatch();
if (_ohmAmount != amounts[0]) revert CurveStrategy_AmountsDoNotMatch();
if (_pairTokenAmount != amounts[1]) revert CurveStrategy_AmountsDoNotMatch();
} else if (poolTokens[1] == ohmAddress) {
if (poolTokens[0] != pairTokenAddress) revert CurveStrategy_LPTokenDoesNotMatch();
if (_ohmAmount != amounts[1]) revert CurveStrategy_AmountsDoNotMatch();
if (_pairTokenAmount != amounts[0]) revert CurveStrategy_AmountsDoNotMatch();
} else {
revert CurveStrategy_LPTokenDoesNotMatch();
}
@@ -16,10 +16,16 @@ interface ICurvePool { | |||
interface ICurvePoolFactory { | |||
function get_coins(address _pool) external view returns (address[4] memory); | |||
|
|||
function deploy_plain_pool(string memory _name, string memory _symbol, address[4] memory _coins, uint256 _A, uint256 _fee) external returns (address); | |||
function deploy_plain_pool( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the functions found in lines 19-29 as they're not used in the contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need them for tests
4e3384d
to
ec0f07c
Compare
No description provided.